//api文件仍保留但不建议使用，推荐使用models中的api。API files remain preserved (deprecated), use models APIs instead.
import type { CmsTags, CmsTagsResponse } from './types.js';

import { requestClient } from '#/api/request';

export const getuctooCmsTagsList = async (page: number, pageSize: number,
  searchParams?: any) => {
  return requestClient.get<CmsTagsResponse>(`/uctoo/cms_tags/${pageSize}/${page}`,{
    params: searchParams,
  });
};

export const getuctooCmsTags = async (id: string) => {
  return requestClient.get<CmsTags>(`/uctoo/cms_tags/${id}`);
};

export const adductooCmsTags = async (data: Partial<CmsTags>) => {
  return requestClient.post<CmsTags>('/uctoo/cms_tags/add', data);
};

export const edituctooCmsTags = async (data: Partial<CmsTags>) => {
  return requestClient.post<CmsTags>('/uctoo/cms_tags/edit', data);
};

export const deleteuctooCmsTags = async (id: string) => {
  return requestClient.post<any>('/uctoo/cms_tags/del', { id });
};
